home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programmer Plus 2007
/
Programmer-Plus-2007.iso
/
Programming
/
High Level Languages
/
Turbo C v3.0
/
Tc3setup.exe
/
EXAMPLES
/
INTRO9.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-02-18
|
394 b
|
15 lines
//INTRO9.CPP--Example from Chapter 3, " An Introduction to C++"
#include <iostream.h>
int main()
{
cout << "1 & 1 is " << (1 & 1) << '\n';
cout << "1 | 1 is " << (1 | 1) << '\n';
cout << "1 ^ 1 is " << (1 ^ 1) << '\n';
cout << "255 << 2 is " << (255 << 2)<< '\n';
cout << "255 >> 2 is "<< (255 >> 2) << '\n';
cout << "~255 is " << ~(unsigned int)255 << '\n';
return 0;
}